#include<bits/stdc++.h>
using namespace std;
#define int long long
int c1, c2, c3;

signed main()
{
//	string s;
//	cin >> s;
	char s[8];
	scanf("%s",s);

	for (int i = 0; i < 8; i++) {
		if (s[i] >= '0' && s[i] <= '9') {
			c1++;
		}
		if (s[i] >= 'a' && s[i] <= 'z') {
			c2++;
		}
		if (s[i] >= 'A' && s[i] <= 'Z') {
			c3++;
		}
	}
	printf("%lld %lld %lld", c1, c2, c3);
//	cout << c1 << " " << c2 << " " << c3 << " ";
	return 0;
}
